home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / bipl.zip / PROCS.ZIP / PARSCOND.ICN < prev    next >
Text File  |  1992-09-28  |  881b  |  36 lines

  1. ############################################################################
  2. #
  3. #    File:     parscond.icn
  4. #
  5. #    Subject:  Procedure to condense parse tree
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     March 31, 1992
  10. #
  11. ###########################################################################
  12. #
  13. #     Procedure to condense a parse tree produced by the output of pargen.icn
  14. #  and produce the string that was parsed.
  15. #
  16. #     The necessary record declaration is provided by the program with which
  17. #  is linked.
  18. #
  19. ############################################################################
  20. #
  21. #  See also:  parsgen.icn
  22. #
  23. ############################################################################
  24.  
  25. procedure parscond(R)
  26.    local result, x
  27.  
  28.    result := ""
  29.  
  30.    every x := !(R.alts) do
  31.      result ||:= string(x) | parscond(x)
  32.    
  33.    return result
  34.  
  35. end
  36.